package com.roc.steelend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.roc.steelend.pojo.BuyOrder;
import com.roc.steelend.pojo.Inventory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.HashMap;
import java.util.List;

@Repository
public interface InventoryMapper  extends BaseMapper<Inventory> {


    List<HashMap<String,Object>> findInventoryByKaiping(@Param("now")Integer now,
                                                        @Param("size")Integer size,
                                                        @Param("smallTypeId")Integer smallTypeId,
                                                        @Param("warehouseId")Integer warehouseId,
                                                        @Param("thickness")BigDecimal thickness,
                                                        @Param("weight")BigDecimal weight);

    Integer findInventoryByKaipingCount(
            @Param("smallTypeId")Integer smallTypeId,
            @Param("warehouseId")Integer warehouseId,
            @Param("thickness")BigDecimal thickness,
            @Param("weight")BigDecimal weight
           );

    List<HashMap<String, Object>> findInventoryById(@Param("inventoryId")Integer inventoryId);

    List<Inventory> findALlMsg(
            @Param("now") Integer now,@Param("size") Integer size,
            @Param("bigTypeId")Integer bigTypeId, @Param("smallTypeId")Integer smallTypeId,
            @Param("warehouseId")Integer warehouseId, @Param("specification")String specification,
            @Param("showWarehouse3") Boolean showWarehouse3,@Param("showOnlyWarehouse3") Boolean showOnlyWarehouse3
            );


    List<HashMap<String,Object>> daigangpingbanInventoryFindRecoding(@Param("now")Integer now,
                                                                     @Param("size")Integer size,
                                                                     @Param("bigTypeId")Integer bigTypeId,
                                                                     @Param("warehouseId")Integer warehouseId,
                                                                     @Param("smallTypeId")Integer smallTypeId,
                                                                     @Param("thickness")BigDecimal thickness);

   Integer daigangpingbanInventoryFindRecodingCount(@Param("bigTypeId")Integer bigTypeId,
                                                                     @Param("warehouseId")Integer warehouseId,
                                                                     @Param("smallTypeId")Integer smallTypeId,
                                                                     @Param("thickness")BigDecimal thickness);





    Integer inventoryFindRecodingCount(
            @Param("now") Integer now,@Param("size") Integer size,
            @Param("bigTypeId")Integer bigTypeId, @Param("smallTypeId")Integer smallTypeId,
            @Param("warehouseId")Integer warehouseId, @Param("specification")String specification,
            @Param("showWarehouse3") Boolean showWarehouse3,@Param("showOnlyWarehouse3") Boolean showOnlyWarehouse3);


    List<HashMap<String,Object>> daigangpingbanInventoryFindRecodingDetailLIst(@Param("smallTypeId")Integer smallTypeId,
                                                                               @Param("thickness")BigDecimal thickness);


    List<HashMap<String, Object>> inventoryWarehouse3();
}

